package com.dyna.foundation.domain.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dyna.constants.DateFatter;
import com.dyna.domain.req.InsertValidateGroup;
import com.dyna.domain.req.UpdateValidateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @author zhoucaiwang
 * @TableName sys_dict
 */
@Data
public class SysDictType implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    @NotNull(message = "字典id不能为空", groups = {UpdateValidateGroup.class})
    private Long dictId;

    @ApiModelProperty(value = "字典类型名称")
    @NotBlank(message = "字典类型名称不能为空", groups = {InsertValidateGroup.class,UpdateValidateGroup.class})
    private String dictName;

    @ApiModelProperty(value = "字典类型")
    @NotBlank(message = "字典类型不能为空", groups = {InsertValidateGroup.class,UpdateValidateGroup.class})
    private String dictType;

    @ApiModelProperty(value = "字典类型状态")
    @NotNull(message = "状态", groups = {InsertValidateGroup.class,UpdateValidateGroup.class})
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "删除标识", notes = "0未删除,2已删除")
    private Integer delFlag;


}